<!DOCTYPE html>
<html lang="cn" class="app fadeInUp animated">

<head>
    <meta charset="utf-8" />
    <title>微信狗</title>
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
    <link href="/assets/stylesheets/bootstrap.min.css" rel="stylesheet" />
    <link href="/assets/stylesheets/animate.min.css" rel="stylesheet" />
    <link href="/assets/stylesheets/font-awesome.min.css" rel="stylesheet" />
    <link href="/assets/stylesheets/style.min.css" rel="stylesheet" />
    <!--[if lt IE 9]><script src="/assets/javascripts/ie8/inie8.min.js"></script><![endif]-->
    <script type="text/javascript">
        var _speedMark = new Date(),
            www_version = {time()};
    </script>

</head>

<body>
    <section class="vbox">
        <header class="header bg-white b-b b-light">
            <p>小程序配置与支付配置（都填写正确，预览二维码方可正常显示）</p>
        </header>
        <section class="scrollable  wrapper">
            <section class="panel panel-default">
                <div class="panel-body">

                    <form class="form-horizontal form-validate" method="post" action="">
						
						<div class="form-group">
							<label for="inputPassword3" class="col-sm-2 control-label">状态：</label>
							
							 <input type="radio" name="status" value="1" {if $m->status==1}checked{/if} >普通商户支付
 							<input type="radio" name="status" value="2" {if $m->status==2}checked{/if} >服务商支付
						</div>
						<div class="line line-dashed line-lg pull-in"></div>
												
                        <div class="form-group">
                            <label class="col-sm-2 control-label">小程序AppId</label>
                            <div class="col-sm-3 must">
                            	{$m->text('AppId','class="form-control" data-rule-required="true"')}
                            </div>
                            <div class="col-sm-5">
                                <p class="form-control-static"><span class="help-inline">小程序 -> 设置 -> 开发 里面有 小程序AppID</span></p>
                            </div>
                        </div>
						<div class="line line-dashed line-lg pull-in"></div>

                        <div class="form-group">
                            <label class="col-sm-2 control-label">小程序AppSecret</label>
                            <div class="col-sm-3 must">
                                {$m->text('AppSecret','class="form-control"')}
                            </div>
                            <div class="col-sm-5">
                                <p class="form-control-static"><span class="help-inline">小程序 -> 设置 -> 开发 里面有 小程序AppSecret</span></p>
                            </div>
                        </div>
						
                        <div class="line line-dashed line-lg pull-in"></div>

						<div class="form-group" id="div1" {if $m->status==1}style="display: none;"{/if}>
                            <label class="col-sm-2 control-label">服务商AppId</label>
                            <div class="col-sm-3">
                            	{$m->text('sAppId','class="form-control" data-rule-required="true"')}
                            </div>
                            <div class="col-sm-5">
                                <p class="form-control-static"><span class="help-inline">服务商的AppId</span></p>
                            </div>
                        </div>
						<div class="line line-dashed line-lg pull-in" id="div1line" {if $m->status==1}style="display: none;"{/if}></div>
						
						
                        <div class="form-group">
                            <label class="col-sm-2 control-label">商户PartnerId</label>
                            <div class="col-sm-3 ">
                                {$m->text('PartnerId','class="form-control" data-rule-required="true"')}
                            </div>
                            <div class="col-sm-5">
                                <p class="form-control-static"><span class="help-inline">微信支付商户平台 -> 账户中心 -> 个人信息 -> 登录账号 就是商户PartnerId</span></p>
                            </div>
                        </div>
                        <div class="line line-dashed line-lg pull-in"></div>
						
                        <div class="form-group">
                            <label class="col-sm-2 control-label">商户PartnerKey</label>
                            <div class="col-sm-3 ">
                                {$m->text('PartnerKey','class="form-control" data-rule-required="true"')}
                            </div>
                            <div class="col-sm-5">
                                <p class="form-control-static"><span class="help-inline">微信支付商户平台 -> 账户中心 -> API安全 -> 修改API密钥 里面有 商户PartnerKey</span></p>
                            </div>
                        </div>
						 <div class="line line-dashed line-lg pull-in"></div>
						 
						
						<div class="form-group" id="div2" {if $m->status==1}style="display: none;"{/if}>
                            <label class="col-sm-2 control-label">子商户号</label>
                            <div class="col-sm-3 ">
                                {$m->text('sPartnerId','class="form-control" data-rule-required="true"')}
                            </div>
                            <div class="col-sm-5">
                                <p class="form-control-static">由服务商创建<span class="help-inline"></span></p>
                            </div>
                        </div>
                        <div class="line line-dashed line-lg pull-in" id="div2line" {if $m->status==1}style="display: none;"{/if}></div>
						
                        <div class="form-group">
                            <label class="col-sm-2 control-label">商户证书cert.pem</label>
                            <div class="col-sm-3 ">
                                {$m->upload('cert_tmp',['type'=>'pem'],'class="form-control"')}
                            </div>
                            <div class="col-sm-5">
                                <p class="form-control-static"><span class="help-inline">{$payParams['cert']?'已上传':'未上传'}</span></p>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">商户证书key.pem</label>
                            <div class="col-sm-3 ">
                                {$m->upload('key_tmp',['type'=>'pem'],'class="form-control"')}
                            </div>
                            <div class="col-sm-5">
                                <p class="form-control-static"><span class="help-inline">{$payParams['key']?'已上传':'未上传'}</span></p>
                            </div>
                        </div>
						
						
                        <div class="line line-dashed line-lg pull-in"></div>

                        <div class="form-group">
                            <div class="col-sm-4 col-sm-offset-2">
                                <button type="submit" class="btn btn-primary" data-loading-text="保存中...">保存</button>
                                <button type="button" class="btn btn-default" data-toggle="back">取消</button>
                            </div>
                        </div>
                    </form>
                </div>
            </section>
        </section>
    </section>
	
    <script src="/assets/javascripts/sea-modules/seajs/seajs/2.2.0/sea.js?v=005"></script>
    <script src="/assets/javascripts/seajs_config.js?v=005"></script>
    <script type="text/javascript">
        seajs.use("dist/application/app.js")
    </script>
	<script>
    	function islogo(id){
			if(id == 1){
				$("#list").show();	
			}else{
				$("#list").hide();
			}
		}
    </script>
	<script type="text/javascript">
	 $(function(){
	  $(":radio").click(function(){
		if($(this).val() == 1){
			$("#div1").hide();	
			$("#div1line").hide();	
			$("#div2").hide();	
			$("#div2line").hide();	
		}else{
			$("#div1").show();	
			$("#div1line").show();	
			$("#div2").show();	
			$("#div2line").show();	
		}
	  });
	 });
	</script>
</body>

</html>
